package com.example.designpatterns.project.darklaunch.one;

/**
 * @author yanyun zhu
 * @version 1.0
 * @date 2022/1/24 8:53
 */
public class DarkDemo {

    public static void main(String[] args) {
        DarkLaunch darkLaunch = new DarkLaunch(); // 默认加载classpath下dark-rule.yaml文件中的灰度规则
        DarkFeature darkFeature = darkLaunch.getDarkFeature("call_newapi_getUserById");
        System.out.println(darkFeature.enabled());
        System.out.println(darkFeature.dark(893));
    }

}
